{{ define "main" }}
    {{ $context := . }}
    
    {{ with .Content }}
        {{ partial "single_article.html" $context }}
    {{ else }}
    <section class="archives-wrap">
        <div class="archive-category-wrap">
            <span class="archive-category">{{ .Title }}</span>
        </div>
        <div class="archives">
            {{ $paginator := .Paginate .Data.Pages }}
            {{ range $paginator.Pages }}
                {{ .Render "summary" }} 
            {{ end }}
        </div>
    </section>
    {{ partial "pagination" . }}
    {{ end }}
{{ end }}